import BuffUtil from '@/BuffUtil';
import UnitSpellEvent from '@/event/UnitSpellEvent';
import SelectCommon from 'code/Core/Common/SelectCommon';
export default class Item_玄冥盾牌 {
    static id = 'AIda';
    static 名称: string = '玄冥盾牌';
    static 描述: string = '增加了护甲';
    static 图标: string = 'ReplaceableTextures\\CommandButtons\\BTNThoriumArmor.blp';
    static buffId: string = 'buff_item_xuanmingdunpai';
    static buffType: AppBuffType = {
        id: 'buff_item_xuanmingdunpai',
        name: Item_玄冥盾牌.名称,
        ubertip: Item_玄冥盾牌.描述,
        art: Item_玄冥盾牌.图标,
        targetArt: 'Abilities\\Spells\\Items\\AIda\\AIdaTarget.mdl',
        targetAttach: 'overhead',
        dur: 10,
        attribute: {
            附加护甲: 20,
        },
    };
    static 添加技能(目标: unit) {
        UnitAddAbility(目标, Item_玄冥盾牌.id);
    }
    static 释放(x: number, y: number, 来源?: unit, 目标?: unit, d?: any) {
        let us = SelectCommon.getAllyUnitInRange(来源, 800);
        for (let u of us) {
            BuffUtil.addBuff(u, Item_玄冥盾牌.buffId, 来源);
        }
    }
    constructor() {
        BuffUtil.registerBuffType(Item_玄冥盾牌.buffType);
        se.onUnitSpellEffect(Item_玄冥盾牌.spellEffect, Item_玄冥盾牌.id);
    }
    static spellEffect(this: void, d: UnitSpellEvent) {
        Item_玄冥盾牌.释放(d.spellTargetX, d.spellTargetY, d.trigUnit, d.spellTargetUnit, d);
    }
}
